package info.nene_loveplus.controller.admin;

import info.nene_loveplus.service.BlogService;

import org.slim3.controller.Navigation;

import com.google.appengine.api.datastore.KeyFactory;

public class DeleteController extends AbstractAdminController {

	private BlogService blogService = new BlogService();

	@Override
	public Navigation doRun() throws Exception {

		String[] keys = paramValues("key");
		for (String key : keys) {
			blogService.delete(KeyFactory.stringToKey(key));
		}

		return redirect("/admin/list");
	}
}
